/*******************************************************************************

This code file XXX

*******************************************************************************/

*** Manage settings

	run "~/Dropbox (MIT)/Research/NYC421a/code/modules/settings.do"

*** Load cleaned PLUTO data
	
	use "$data/clean/pluto_merged.dta", clear
	
	keep bbl xcoord_spc ycoord_spc ycoord_latlong xcoord_latlong
	
*** Export lat-long coordinates

	preserve
	
	keep bbl ycoord_latlong xcoord_latlong
	drop if missing(xcoord_latlong) | missing(ycoord_latlong)
	
	export delimited using "$data/raw/coordinates/coords_latlong.csv", replace 
	
	restore

*** Export State Plane Coordinates (SPC)

	preserve
	
	keep bbl ycoord_spc xcoord_spc
	drop if missing(xcoord_spc) | missing(ycoord_spc)
	
	export delimited using "$data/raw/coordinates/coords_spc.csv", replace 
	
	restore
